#include "GameState.h"
#include <graphics.h>

GameState::GameState()
        : Width(600),
          Height(600),
          needCheck(false),
          boardData{{ {'_', '_', '_'}, {'_', '_', '_'}, {'_', '_', '_'} }},
          pieces{'X', 'O'},
          running(true),
          currentPiece(0),
          moveCount(0)
{
    initgraph(Width, Height);
}

bool GameState::isRunning() const {
    return running;
}
void GameState::quit() {
    running = false;
}

void GameState::resetGame() {
    for (auto& row : boardData) {
        for (char& cell : row) {
            cell = '_';
        }
    }
    currentPiece = 0;
    moveCount = 0;
}

